package com.dwxt.mall.dao;

import com.dwxt.mall.entity.PayOrder;
import com.dwxt.mall.entity.PayOrderExample;
import com.dwxt.mall.entity.vo.OrderVO;
import org.apache.ibatis.annotations.Param;

import javax.websocket.server.PathParam;
import java.util.List;
import java.util.Map;

public interface PayOrderMapper {
    long countByExample(PayOrderExample example);

    int deleteByExample(PayOrderExample example);

    int deleteByPrimaryKey(String id);

    int insert(PayOrder record);

    int insertSelective(PayOrder record);

    List<PayOrder> selectByExampleWithBLOBs(PayOrderExample example);

    List<PayOrder> selectByExample(PayOrderExample example);

    PayOrder selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") PayOrder record, @Param("example") PayOrderExample example);

    int updateByExampleWithBLOBs(@Param("record") PayOrder record, @Param("example") PayOrderExample example);

    int updateByExample(@Param("record") PayOrder record, @Param("example") PayOrderExample example);

    int updateByPrimaryKeySelective(PayOrder record);

    int updateByPrimaryKeyWithBLOBs(PayOrder record);

    int updateByPrimaryKey(PayOrder record);

    OrderVO selectOrder(String id);

    List<OrderVO> selectMallOrderList(@Param("userId") String userId, @Param("status") String status,
                                      @Param("type") Integer type);

    Map selectOrderStatistics(@Param("year") Integer year, @Param("month") Integer month);

    List<Map> orderStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime);

    List<Map> selectSellGroupByProductId();

}